//
//  MobileDeviceController.h
//  eBookr
//
//  Created by Zachary Brewster-Geisz on 9/22/07.
//  Copyright 2007 Zachary Brewster-Geisz. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MobileDevice.h"
#import "eBookr_Prefix.pch"


@interface MobileDeviceController : NSObject {
	//NSMutableArray *eBookFolderTree;
}

struct my_am_dev_struct {

	struct am_device_notification *notif;
	struct am_device *theDevice;
	struct afc_connection *theHandle;
	struct afc_connection *theConnection;
	struct afc_directory *currentDir;
};

enum { iphoneDisconnected, iphoneConnected, iphoneError };

int iphoneCurrentStatus;

struct my_am_dev_struct theDevStruct;

- (NSArray *)saveBooksFromPhoneToLocalPath:(NSString *)path;
- (NSArray *)booksInRootFolder;
//- (void)populateEBookFolderTree;
- (int)copyTheseFiles:(NSArray *)files;
- (int)drillIntoSubdirectory:(NSString *)currentPath;
- (int)copyThisFile:(NSString *)filePath baseDir:(NSString *)baseDir;
- (int)copyFileAtRemotePath:(NSString *)remotePath toLocalBase:(NSString *)localBase;
- (int)mirrorDirectoryAtRemotePath:(NSString *)remotePath toLocalDir:(NSString *)localDir;

void callbackFunction(struct am_device_notification_callback_info *info);

@end
